// 更新支付宝账号

export const updateAlipayApi = <T>(data: any) =>
  uni.http<T>({
    url: 'api/member/updAli',
    method: 'POST',
    data,
    requestType: 'baby',
  })

// 编辑用户头像、昵称、手机号、性别
export const editUserApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/edit',
    method: 'POST',
    data,
    from: '编辑用户头像、昵称、手机号、性别',
  })

// 注销用户账号
export const cancelAccountApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/cancel',
    method: 'POST',
    data,
  })

// 获取人脸验证信息
export const getFaceInfoApi = <T>(data?: any) =>
  uni.http<T>({
    url: 'doctorapp/v1/getFaceId',
    data,
  })

// 人脸认证结果提交
export const faceAuthApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/faceCertify',
    method: 'POST',
    data,
  })

// 优惠券》用户账单
export const getBillApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/bill',
    data,
  })

// 关注列表
export const getFollowListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'doctorapp/v1/doctor_follow_fans',
    data,
  })

// 粉丝列表
export const getFansListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/fanser',
    data,
  })

// 获取用户主页空间信息
export const getUserSpaceApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/user_center',
    data,
  })
// 获取用户主页动态信息
export const getUserHomepageApi = <T>(data: any, url: any = 'blapp/v1/user/homepageUpdates') =>
  uni.http<T>({
    url,
    data,
  })
// 删除用户主页动态信息
export const delhomepageApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/homepageUpdatesDel',
    data,
  })
// 获取用户主页赞过信息
export const getUserLikeApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/homepageUpdatesLike',
    data,
  })
// 获取用户主页个人标签
export const getUserIdentityTageApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/identityTag',
    data,
  })

// 关注、取消关注
export const followApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/follow',
    data,
  })
// 关注、取消关注
export const followDelApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/follow_del',
    method: 'POST',
    data,
  })

// 修改手机号
export const editMobileApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/editMobile',
    method: 'POST',
    data,
  })

// 余额列表
export const getBalanceListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/balance_list',
    data,
  })

// 积分列表
export const getIntegralListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/integral_list',
    data,
  })

// 个人中心推荐列表》伴侣
export const getRecommendListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'sq/post/randList',
    data,
    requestType: 'bl',
  })
// 个人中心推荐列表》app
export const getAppRecommendListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/search/random',
    data,
    requestType: 'app',
  })

// 首页底部列表
export const getHomeHotBottomListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'api/main/sort_list',
    data,
    requestType: 'bl',
  })

// 个人主页 话题列表
export const getTopicListApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/topic',
    data,
  })
// 他人主页科普列表
export const gethomepagePopularApi = <T>(data: any) =>
  uni.http<T>({
    url: 'blapp/v1/user/homepagePopular',
    data,
  })

// 开启、关闭 个性化推荐
export const setRecommendApi = <T>() =>
  uni.http<T>({
    url: 'blapp/v1/user/recommend',
  })
// 获取医生主页信息
export const getDoctorInfoApi = <T>(data: any) =>
  uni.http<T>({
    url: 'yc/Doctor/info',
    data,
    requestType: 'bl',
  })
// 获取官方主页信息
export const getUserInfoApi = <T>(data: any) =>
  uni.http<T>({
    url: 'yc/Doctor/getUserInfo',
    data,
    requestType: 'bl',
  })
// 获取医生、官方主页文章列表
export const getDoctorArticleApi = <T>(data: any, url: any = 'yc/Doctor/getArticle') =>
  uni.http<T>({
    url,
    data,
    requestType: 'bl',
  })
// 获取医生主页赞过列表
export const getDoctorLikeApi = <T>(data: any) =>
  uni.http<T>({
    url: 'doctorapp/v1/doctor_zan_list',
    data,
    // requestType: 'bl',
  })
